package org.dromara.xxmj.utils;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.constant.SystemConstants;
import org.dromara.common.core.constant.TenantConstants;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.tenant.exception.TenantException;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.system.mapper.SysUserMapper;
import org.dromara.xxmj.domain.vo.CourseGeneralVO;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;

/**
 * GIT-zaixianjiaoyu
 *
 * @param
 * @Author 王晨沣
 * @Date 2025-05-14 09:15:38 （可以根据需要修改）
 */
@Slf4j
@Repository
public class ConvertUtils {

    /**
     * VO转换
     */
    public  <T> void convertAndAddToList(Collection<T> sourceList, Class<T> sourceClass, List<CourseGeneralVO> targetList) {
        for (T item : sourceList) {
            CourseGeneralVO vo = new CourseGeneralVO();
            BeanUtil.copyProperties(item, vo);
            targetList.add(vo);
        }
    }
}
